import { BrowserRouter as Router, Link } from 'react-router-dom';
import routerConfig from '@router/router.config';
import RouterView from '@router/router.view';

import './App.css';

function App() {
  return (
    <>
      <Router>
        <Link to="/">首页</Link>
        |
        <Link to="/login">登录</Link>
        |
        <Link to="/user">用户中心</Link>
        <RouterView routers={routerConfig} />
      </Router>
    </>
  );
}

// function App() {
// const {store} = useContext(MobXProviderContext);

// console.log(store.appStore.isLogin)
// return (
// <div>
// <button onClick={() => { store.appStore.setLoginState() }}>登录</button>
// </div>
// )
// }

export default App;
